package com.zy.framework.web.page;

import com.zy.common.constant.Constants;
import com.zy.framework.util.ServletUtils;

/**
 * @program: zhengyang
 * @author: LuoXin
 * @create: 2018-12-21 12:34
 * @description: 表格数据处理
 */

public class TableSupport
{
    public static PageDomain getPageDomain(){
        PageDomain pageDomain=new PageDomain();
        pageDomain.setPageNum(ServletUtils.getParameterToInt(Constants.PAGE_NUM));
        pageDomain.setPageSize(ServletUtils.getParameterToInt(Constants.PAGE_SIZE));
        pageDomain.setOrderByColumn(ServletUtils.getParameter(Constants.ORDER_BY_COLUMN));
        pageDomain.setIsAsc(ServletUtils.getParameter(Constants.IS_ASC));
        return pageDomain;
    }
    public static PageDomain buildPageRequest()
    {
        return getPageDomain();
    }
}
